package com.yand.thinkingInJava.thinkingInJava21.responseUI;



class UnresponsiveUI{
    private volatile double d = 1;
    public UnresponsiveUI() throws Exception{
        while(d > 0){
            d = d + (Math.PI + Math.E) / d;
        }
        System.in.read();

    }
}

public class ResponsesiveUI extends Thread {
    private static volatile double d = 1;
    public ResponsesiveUI(){
        setDaemon(true);
        start();
    }

    public void run(){
        while(true){
            d = d + (Math.PI + Math.E)/d;
        }
    }




    public static void main(String [] args) throws Exception{
          /*  new ResponsesiveUI();
            System.in.read();
            System.out.println(d);*/


    }
}
